//
//  UIButton+Extension.swift
//  weibo10
//
//  Created by cai on 16/4/13.
//  Copyright © 2016年 cai. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(imageName:String,backImageName:String) {
    self.init()
    
    setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        setBackgroundImage(UIImage(named: backImageName), forState: UIControlState.Normal)
        setBackgroundImage(UIImage(named: backImageName + "_highlighted"), forState: UIControlState.Highlighted)
        sizeToFit()

    }
}
